<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>代碼生成</title>
    <meta name="keywords" content="列表部门表">
    <meta name="description" content="列表部门表">
    <link rel="shortcut icon" href="/web/favicon.ico">
    <link href="/web/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/web/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="/web/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20210202" rel="stylesheet"/>
    <link href="/web/css/animate.min.css" rel="stylesheet"/>
    <link href="/web/css/style.css?v=20200903" rel="stylesheet"/>
    <link href="/web/andy/css/ry-ui.css?v=4.6.1" rel="stylesheet"/>
    <a id="scroll-up" href="javascript:void(0);" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
    <script src="/web/js/jquery.min.js"></script>
    <script src="/web/js/bootstrap.min.js"></script>
    <!-- bootstrap-table 表格插件 -->
    <script src="/web/ajax/libs/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/web/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20210202"></script>
    <script src="/web/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
    <!-- jquery-validate 表单验证插件 -->
    <script src="/web/ajax/libs/validate/jquery.validate.min.js"></script>
    <script src="/web/ajax/libs/validate/messages_zh.min.js"></script>
    <script src="/web/ajax/libs/validate/jquery.validate.extend.js"></script>
    <!-- jquery-validate 表单树插件 -->
    <script src="/web/ajax/libs/bootstrap-treetable/bootstrap-treetable.js"></script>
    <!-- 遮罩层 -->
    <script src="/web/ajax/libs/blockUI/jquery.blockUI.js"></script>
    <script src="/web/ajax/libs/iCheck/icheck.min.js"></script>
    <script src="/web/ajax/libs/layer/layer.min.js"></script>
    <script src="/web/ajax/libs/layui/layui.js"></script>
    <script src="/web/andy/js/common.js?v=4.6.1"></script>
    <script src="/web/andy/js/andy-ui.js?v=4.6.1"></script>
    <script src="/webjars/vue/2.6.14/vue.min.js"></script>
    <link href="/web/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" rel="stylesheet"/>
    <script src="/web/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js"></script>
</head>
<body class="gray-bg">
<div id="container">

    <div class="wrapper wrapper-content animated fadeInRight ibox-content" id="addForm" >
        <form class="form-horizontal m" id="form-menu-add">
            <div class="form-group">
                <label class="control-label col-sm-3">
                    包名
                </label>
                <div class="col-sm-7" >
                    <input v-model="entity.packageName" type="text"  class="form-control" name="packageName"  placeholder="代码所在的包名">
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-sm-3">
                    模块名称
                </label>
                <div class="col-sm-7" >
                    <input v-model="entity.module" type="text"  class="form-control" name="module"  placeholder="包名下的模块">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-3">
                    请求前缀
                </label>
                <div class="col-sm-7" >
                    <input v-model="entity.prefix" type="text"  class="form-control" name="prefix"  placeholder="请求前缀">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-3">
                    数据库表名
                </label>
                <div class="col-sm-7" >
                    <input v-model="entity.tableName" type="text"  class="form-control" name="tableName"  placeholder="逆向的表名">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12" align="center">
                    <button type="button" @click="save();" class="btn btn-primary">保存</button>
                </div>
            </div>




        </form>
    </div>
</div>
</body>
<script>
    var index2;
    let vm = new Vue({
        el:'#container',
        data:{
            datas:[],
            entity:{
            }
        },
        methods: {
            save: function () {
                $.operate.get('/generator/create', vm.entity, function (ret) {
                    vm.entity = {};
                });
            }
        }
    });

</script>

<script>
    $(function(){
        var icon = "<i class='fa fa-times-circle'></i> ";
        formValidate = $("#form-menu-add").validate({
            rules:{
                deptId: "required" ,
                parentId: "required" ,
                ancestors: "required" ,
                deptName: "required" ,
                orderNum: "required" ,
                leader: "required" ,
                phone: "required" ,
                email: "required" ,
                status: "required"
            },
            messages:{
                deptId: icon + "必填" ,
                parentId: icon + "必填" ,
                ancestors: icon + "必填" ,
                deptName: icon + "必填" ,
                orderNum: icon + "必填" ,
                leader: icon + "必填" ,
                phone: icon + "必填" ,
                email: icon + "必填" ,
                status: icon + "必填"
            }
        })
    })
</script>

</html>
